Welcome![Sign In][Sign Up]
Location:
Search - Winsock u

Search list

[Other resourceWINDOWS__socket5

Description: 本书第二部分讲述的是在Wi n 3 2平台上的Wi n s o c k编程。对于众多的基层网络协议, Wi n s o c k是访问它们的首选接口。而且在每个Wi n 3 2平台上,Wi n s o c k都以不同的形式存在着。 Wi n s o c k是网络编程接口,而不是协议。它从U n i x平台的B e r k e l e y(B S D)套接字方案借鉴了 许多东西,后者能访问多种网络协议。在Wi n 3 2环境中,Wi n s o c k接口最终成为一个真正的 “与协议无关”接口,尤其是在Winsock 2发布之后。-book on the second part of the Wi n 3 2 on the platform's Wi n o c k programming. To many of the grass-roots network protocol, Wi n s o c k is to visit their preferred interface. But in each Wi n 3 2 platform, Wi n o c k's in different forms exist. Wi n s o c k network programming interface, rather than agreement. From U n i x platform B e r k e l e y (S B D) socket program draws many things, The latter would be able to visit a variety of network protocols. In Wi n 3 2 environment, Wi n o c k s interface will eventually become a real "agreement has nothing to do with the" interface, especially in the Winsock 2 was released.
Platform: | Size: 362079 | Author: 楼洛阳 | Hits:

[Other resourceWINDOWS__socket13

Description: 利用“原始套接字”(Raw Socket),我们可访问位于基层的传输协议。本章专门讲解如 何运用这种原始套接字,来模拟I P的一些实用工具,比如Tr a c e r o u t e和P i n g程序等等。使用原 始套接字,亦可对I P头信息进行实际的操作。本章只关心I P协议;至于如何针对其他协议使 用原始套接字,我们不打算提及。而且,大多数协议(除AT M以外)根本就不支持原始套接 字。所有原始套接字都是使用S O C K _ R AW这个套接字类型来创建的,而且目前只有Wi n s o c k 2提供了对它的支持。因此,无论Microsoft Windows CE 还是老版本的Windows 95 (无 Winsock 2升级)均不能利用原始套接字的能力。-use "raw socket" (Raw Socket), we can visit at the grassroots transmission agreements. This chapter specifically on how to use the original socket, I P to simulate some practical tools, For example Tr a c e r t o u e and P i n g procedures, and so on. Original socket, I can right the first P information of the actual operation. I only care about this chapter P Agreement; As to how the other agreements original socket, we do not intend to mention. Moreover, most agreements (except outside AT M) simply does not support the original socket. All original socket are using S O C K R AW _ the socket types to create, but it's only Wi n o c k 2 of the support it. Therefore, Whether Microsoft Windows CE or an older version of Windows 95 (non-Win sock escalation 2) are not using the ori
Platform: | Size: 692344 | Author: 楼洛阳 | Hits:

[WinSock-NDISWinSock

Description: Windows Sockets规范以U.C. Berkeley大学BSD UNIX中流行的Socket接口为范例定义了一套Micosoft Windows下网络编程接口。它不仅包含了人们所熟悉的Berkeley Socket风格的库函数;也包含了一组针对Windows的扩展库函数,以使程序员能充分地利用Windows消息驱动机制进行编程。
Platform: | Size: 302250 | Author: 李晓明 | Hits:

[Internet-Network一个判断远程主机存活程序代码

Description: 一个判断远程主机存活程序代码(ping) #include #include #include #include #include "winsock.h" #pragma comment(lib,"Ws2_32"); #define SEND_SIZE 32 #define PACKET_SIZE 4096 #define ICMP_ECHO 8 #define ICMP_ECHOREPLY 0 struct icmp { unsigned char icmp_type; unsigned char icmp_code; unsigned short icmp_cksum; unsigned short icmp_id; unsigned short icmp_seq; unsigned long icmp_data; }; struct ip { unsigned char ip_hl:4; unsigned char ip_v:4; unsigned char ip_tos; unsigned short ip_len; unsigned short ip_id; unsigned short ip_off; unsigned char ip_ttl; unsigned char ip_p; unsigned short ip_sum; unsigned long ip_src; unsigned long ip_dst; }; unsigned char sendpacket[PACKET_SIZE]; unsigned char recvpacket[PACKET_SIZE]; struct sockaddr_in dest_addr; struct sockaddr_in from_addr; int sockfd; int pid; unsigned short cal_chksum(unsigned short *addr,int len); int pack(int pack_no); int unpack(unsigned char *buf,int len); void send_packet(void); void recv_packet(void); void main(int argc,char *argv[]) { struct hostent *host; struct protoent *protocol; WSADATA wsaData; int timeout=1000; int SEND_COUNT=4; int i; char *par_host; par_host=argv[argc-1]; //IP赋值 switch(argc) { case 2: break; case 3: if(strcmp(argv[1],"-t")==0) { SEND_COUNT=10000; break; } //fall through default: printf("usage: %s [-t] Host name or IP address\n",argv[0]); exit(1); } if(WSAStartup(0x1010,&wsaData)!=0) { printf("wsastartup error\n"); exit(1); } if( (protocol=getprotobyname("icmp") )==NULL) { printf("getprotobyname error\n"); exit(1); } /* printf("%s\n",protocol->p_name); printf("%s\n",protocol->p_aliases); printf("%d\n",protocol->p_proto); system("pause"); */ if( (sockfd=socket(AF_INET,SOCK_RAW,protocol->p_proto) )<0) { printf("socket error\n"); exit(1); } if(setsockopt(sockfd,SOL_SOCKET,SO_RCVTIMEO,(char*)&timeout,sizeof(timeout))h_length); //resolve address to hostname if(host=gethostbyaddr(host->h_addr,4,PF_INET)) par_host=host->h_name; // //printf("%s\n",par_host); // } else if( dest_addr.sin_addr.s_addr=inet_addr(par_host)==INADDR_NONE) { printf("Unkown host %s\n",par_host); exit(1); } pid=getpid(); /* printf("%d\n",pid); system("pause"); */ printf("Pinging %s [%s]: with %d bytes of data:\n\n",par_host,inet_ntoa(dest_addr.sin_addr),SEND_SIZE); for(i=0;i1) { sum+=*w++; nleft-=2; } if( nleft==1) { *(unsigned char *)(&answer)=*(unsigned char *)w; sum+=answer; } sum=(sum>>16)+(sum&0xffff); sum+=(sum>>16); answer=~sum; return answer; } //打包 int pack(int pack_no) { int packsize; struct icmp *icmp; packsize=8+SEND_SIZE; icmp=(struct icmp*)sendpacket; icmp->icmp_type=ICMP_ECHO; icmp->icmp_code=0; icmp->icmp_cksum=0; icmp->icmp_seq=pack_no; icmp->icmp_id=pid; icmp->icmp_data=GetTickCount(); icmp->icmp_cksum=cal_chksum( (unsigned short *)icmp,packsize); /*校验算法*/ return packsize; } //解包 int unpack(unsigned char *buf,int len) { struct ip *ip; struct icmp *icmp; double rtt; int iphdrlen; ip=(struct ip *)buf; iphdrlen=ip->ip_hl*4; icmp=(struct icmp *)(buf+iphdrlen); if( (icmp->icmp_type==ICMP_ECHOREPLY) && (icmp->icmp_id==pid) ) { len=len-iphdrlen-8; rtt=GetTickCount()-icmp->icmp_data; printf("Reply from %s: bytes=%d time=%.0fms TTL=%d icmp_seq=%u\n", inet_ntoa(from_addr.sin_addr), len, rtt, ip->ip_ttl, icmp->icmp_seq); return 1; } return 0; } //发送 void send_packet() { int packetsize; static int pack_no=0; packetsize=pack(pack_no++); if( sendto(sockfd,(char *)sendpacket,packetsize,0,(struct sockaddr *)&dest_addr,sizeof(dest_addr) )=0) success=unpack(recvpacket,n); else if (WSAGetLastError() == WSAETIMEDOUT) { printf("Request timed out.\n"); return; } }while(!success); } UID5380 帖子239 精华0 积分1289 阅读权限40 来自软件学院 在线时间81 小时 注册时间2006-5-22 最后登录2007-2-24 查看详细资料 TOP
Platform: | Size: 5881 | Author: shuiyuan313 | Hits:

[Internet-Networkudp

Description: VC编程用UPD协议实现广播通信-VC programming corresponds with the UPD agreement realization broadcast
Platform: | Size: 14336 | Author: phyllisqq | Hits:

[Internet-NetworkVB UDP端到端程序

Description: 本程序使用UDP协议完成端到端的通信 使用了winsock控件-procedures for the use of the UDP complete end-to-end communication protocols of the use of the controls
Platform: | Size: 881664 | Author: king | Hits:

[Internet-NetworkVBudp

Description: VB的WINSOCK进行udp攻击源代码-VB Winsock for udp attacks source code
Platform: | Size: 3072 | Author: jfdksla | Hits:

[VC/MFCWINDOWS__socket5

Description: 本书第二部分讲述的是在Wi n 3 2平台上的Wi n s o c k编程。对于众多的基层网络协议, Wi n s o c k是访问它们的首选接口。而且在每个Wi n 3 2平台上,Wi n s o c k都以不同的形式存在着。 Wi n s o c k是网络编程接口,而不是协议。它从U n i x平台的B e r k e l e y(B S D)套接字方案借鉴了 许多东西,后者能访问多种网络协议。在Wi n 3 2环境中,Wi n s o c k接口最终成为一个真正的 “与协议无关”接口,尤其是在Winsock 2发布之后。-book on the second part of the Wi n 3 2 on the platform's Wi n o c k programming. To many of the grass-roots network protocol, Wi n s o c k is to visit their preferred interface. But in each Wi n 3 2 platform, Wi n o c k's in different forms exist. Wi n s o c k network programming interface, rather than agreement. From U n i x platform B e r k e l e y (S B D) socket program draws many things, The latter would be able to visit a variety of network protocols. In Wi n 3 2 environment, Wi n o c k s interface will eventually become a real "agreement has nothing to do with the" interface, especially in the Winsock 2 was released.
Platform: | Size: 361472 | Author: 楼洛阳 | Hits:

[VC/MFCWINDOWS__socket13

Description: 利用“原始套接字”(Raw Socket),我们可访问位于基层的传输协议。本章专门讲解如 何运用这种原始套接字,来模拟I P的一些实用工具,比如Tr a c e r o u t e和P i n g程序等等。使用原 始套接字,亦可对I P头信息进行实际的操作。本章只关心I P协议;至于如何针对其他协议使 用原始套接字,我们不打算提及。而且,大多数协议(除AT M以外)根本就不支持原始套接 字。所有原始套接字都是使用S O C K _ R AW这个套接字类型来创建的,而且目前只有Wi n s o c k 2提供了对它的支持。因此,无论Microsoft Windows CE 还是老版本的Windows 95 (无 Winsock 2升级)均不能利用原始套接字的能力。-use "raw socket" (Raw Socket), we can visit at the grassroots transmission agreements. This chapter specifically on how to use the original socket, I P to simulate some practical tools, For example Tr a c e r t o u e and P i n g procedures, and so on. Original socket, I can right the first P information of the actual operation. I only care about this chapter P Agreement; As to how the other agreements original socket, we do not intend to mention. Moreover, most agreements (except outside AT M) simply does not support the original socket. All original socket are using S O C K R AW _ the socket types to create, but it's only Wi n o c k 2 of the support it. Therefore, Whether Microsoft Windows CE or an older version of Windows 95 (non-Win sock escalation 2) are not using the ori
Platform: | Size: 692224 | Author: 楼洛阳 | Hits:

[CommunicationVFPChat

Description: 用VFP编的一个用WinSock写的聊天程序,基于UDP的。-with VFP addendum to the use of a chat WinSock write procedures, based on UDP.
Platform: | Size: 53248 | Author: MOL | Hits:

[Internet-NetworkWINSOCK

Description: 网络聊天程序 我写的比较好用 希望能给大家带来好的意义-Network chat program I wrote the U.S. hope that they will be relatively easy to use bring good significance
Platform: | Size: 1856512 | Author: | Hits:

[.netFormUdpReceive

Description: Vb.net主要是WinSock的Udp 接收端程式範例 -Vb.net mainly WinSock UDP receiving end of the example program
Platform: | Size: 5120 | Author: jenkang | Hits:

[Internet-NetworkUDp

Description: 用UDP,WINSOCK实现简单的聊天功能-Using UDP, WINSOCK simple chat
Platform: | Size: 103424 | Author: | Hits:

[Internet-NetworkWINSOCK-UDP

Description: 使用vb编写的UDP通讯(通信)程序,windows/winsock.-Vb prepared to use UDP communication (communication) procedures, windows/winsock.
Platform: | Size: 95232 | Author: 邹君 | Hits:

[Internet-NetworkvbUDP

Description: winsock udp vb.测试通过,可以运行,有代码和程序-winsock udp vb. test, you can run, there are codes and procedures
Platform: | Size: 94208 | Author: liqiang | Hits:

[Internet-NetworkWinSock

Description: Windows Sockets规范以U.C. Berkeley大学BSD UNIX中流行的Socket接口为范例定义了一套Micosoft Windows下网络编程接口。它不仅包含了人们所熟悉的Berkeley Socket风格的库函数;也包含了一组针对Windows的扩展库函数,以使程序员能充分地利用Windows消息驱动机制进行编程。 -Windows Sockets specification to UC Berkeley University of BSD UNIX in popular Socket interface for the definition of a set of examples of Micosoft Windows Network Programming Interface. It not only contains the familiar style of the Berkeley Socket Library Functions also contains a set of Windows for the expansion of library functions to enable programmers to make full use of Windows message-driven programming mechanism.
Platform: | Size: 302080 | Author: 李晓明 | Hits:

[ICQ-IM-Chatwinsock_chat

Description: 基于winsock的聊天室程序 共享自己写的基于winsocket的聊天室程序,新手第一次写的程序~~以前自己找了很多网站都没找到过这方面的,现在我把自己写的传上来供大家参考下~~~也希望大家多多给我建议~~这是我第一次自己写的TCP聊天室程序。同时感谢在论坛里面给我过帮助的朋友,谢谢你们的支持。 程序介绍:1、用C++语言,基于DOS界面 2、可供用户输入用户名 3、最大可连接用户500名 4、此程序是基于TCP的局域网聊天室程序 程序操作说明:1、启动服务器 2、启动客户端,输入用户名和服务器所在的IP地址-Winsock-based chat room sharing their own Writing WinSocket based chat room procedures, new procedures for the first time ~ ~ Writing ago to find a lot of their own site did not find in this area, and now I wrote it myself Chuan-up for U.S. refer to the following ~ ~ ~ also hope that more to the U.S. I suggest that ~ ~ this is the first time I wrote it myself TCP Chat program. At the same time, thanks to the forum which helped me a friend, Thank you your support. Introduce procedures: one, using C++ Language, DOS-based interface 2, for the user to enter a user name 3, the biggest users can connect 500 4, this procedure is based on TCP LAN Chat Program Instructions: 1, start server 2, start the client, enter your user name and server IP address
Platform: | Size: 4096 | Author: 姚先生 | Hits:

[Internet-Networklabcvi_udp

Description: 虚拟测试平台labwindows cvi8.1 调用udp的方法。labwidows cvi本身只支持tcp协议,不支持udp协议,给出调用winsock控件的方法。 -Virtual test platform labwindows cvi8.1 call udp method. labwidows cvi agreement itself only supports tcp, udp protocol does not support the given method call winsock control.
Platform: | Size: 560128 | Author: qihm007 | Hits:

[Internet-NetworkTCPUDP(VC++)

Description: VC网络编程,包含TCP和UDP VC网络编程,包含TCP和UDP-VC network programming, including TCP and UDP VC network programming, including TCP and UDP
Platform: | Size: 45056 | Author: xiewei | Hits:

[Internet-Networksocket(UDP)

Description: winsock实现网络通信(UDP)异步模式-winsock network communications (UDP) asynchronous mode
Platform: | Size: 139264 | Author: 陈相镇 | Hits:
« 12 »

CodeBus www.codebus.net